package com.bqtv.sport.ui.mine

import android.content.Context
import android.content.Intent
import android.os.Handler
import android.os.Looper
import android.view.View
import com.bqtv.sport.app.AppActivity
import com.bqtv.sport.commen.utils.KeyboardUtils
import com.bqtv.sport.commen.utils.glide.GlideApp
import com.bqtv.sport.commen.widget.VerificationCodeEditText
import com.bqtv.sport.databinding.ActivityMatchDateBinding
import com.bqtv.sport.databinding.ActivityPayPswBinding
import com.bqtv.sport.databinding.ActivityPersonalProfileBinding
import com.bqtv.sport.dialog.SelectPicBottomDialog
import com.bqtv.sport.ui.home.SearchActivity
import com.hjq.base.BaseActivity
import com.hjq.base.util.GlideEngine
import com.hjq.toast.Toaster
import com.luck.picture.lib.basic.PictureSelector
import com.luck.picture.lib.config.SelectMimeType
import com.luck.picture.lib.entity.LocalMedia
import com.luck.picture.lib.interfaces.OnResultCallbackListener

class SetPayPswActivity : AppActivity<ActivityPayPswBinding>() {
    var mHandler: Handler? = null
    companion object {
        fun start(context: Context) {
            val intent = Intent(context, SetPayPswActivity::class.java)
            context.startActivity(intent)
        }
    }

    override fun getViewBinding() = ActivityPayPswBinding.inflate(layoutInflater)

    override fun initView() {

    }

    override fun initData() {
        binding.verEdit.setOnInputTextListener(object :
            VerificationCodeEditText.OnInputTextListener {
            override fun onInputTextComplete(text: CharSequence) {
                Toaster.show("你输入的验证码为:${text}")
            }
        })
        mHandler= Handler(Looper.getMainLooper())
        Looper.myQueue().addIdleHandler {
            mHandler?.postDelayed({
                KeyboardUtils.showSoftInput(binding.verEdit)
            }, 500)

            false
        }


        initListener()
    }

    private fun initListener() {


    }

    override fun onClick(view: View) {
        super.onClick(view)
        when(view){

        }
    }

    override fun finish() {
        KeyboardUtils.hideSoftInput(this)
        super.finish()
    }
}